<?php

namespace Iyting\Tiktok\MiniProgram\GoodLife;


use Iyting\Tiktok\Kernel\BaseClient;

class Client extends BaseClient
{
    protected $needAccessToken = false;
    protected $needClientToken = true;
    protected  $baseUri = 'https://open.douyin.com/goodlife/v1/';



    public function createProduct($productInfo = [])
    {

        return $this->httpPostJson('goods/product/save/',$productInfo);
    }

    public function operateProduct(string $out_id, int $action = 1)
    {
        $params['out_id'] = $out_id;
        $params['op_type'] = $action;
        $params['account_id'] = $this->app->config['account_id'];
        return $this->httpPostJson('goods/product/operate/',$params);
    }

 

}